import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;

public class GeneralReports {

	private Connection connection;
	protected ArrayList listReports;
	protected Statement statement;
	protected ResultSet resultSet;
	protected DepositDBManager depositDBManager;
	protected CustomerDBManager customerDBManager;
	protected AccountDBManager accountDBManager;
	protected BalanceDBManager balanceDBManager;
	protected DepositTypesDBManager depositTypesDBManager;

	public GeneralReports(Connection initConnection, DepositDBManager depositDBManager, CustomerDBManager customerDBManager, AccountDBManager accountDBManager, BalanceDBManager balanceDBManager, DepositTypesDBManager depositTypesDBManager) {
		// constructor - initialiaze connection
		// use this connection in all functions of AccountManager

		setConnection(initConnection);
		setDepositDBManager(depositDBManager);
		setCustomerDBManager(customerDBManager);
		setAccountDBManager(accountDBManager);
		setBalanceDBManager(balanceDBManager);
		setDepositTypesDBManager(depositTypesDBManager);

	}

	public DepositTypesDBManager getDepositTypesDBManager() {
		return depositTypesDBManager;
	}

	public void setDepositTypesDBManager(DepositTypesDBManager depositTypesDBManager) {
		this.depositTypesDBManager = depositTypesDBManager;
	}

	public Connection getConnection() {
		return connection;
	}

	public void setConnection(Connection connection) {
		this.connection = connection;
	}

	// Customers by id number
	public Customer getCostomerByCustId(long custId) throws DBManagerException {

		Customer customer = customerDBManager.getCustomerById(custId);
		return customer;
	}

	// Deposits by id number
	public List getDepositsByCustId(long depositId) {

		return depositDBManager.getDepositByCustId(depositId);
	}

	public DepositDBManager getDepositDBManager() {
		return depositDBManager;
	}

	public void setDepositDBManager(DepositDBManager depositDBManager) {
		this.depositDBManager = depositDBManager;
	}

	public CustomerDBManager getCustomerDBManager() {
		return customerDBManager;
	}

	public void setCustomerDBManager(CustomerDBManager customerDBManager) {
		this.customerDBManager = customerDBManager;
	}

	public AccountDBManager getAccountDBManager() {
		return accountDBManager;
	}

	public void setAccountDBManager(AccountDBManager accountDBManager) {
		this.accountDBManager = accountDBManager;
	}

	public BalanceDBManager getBalanceDBManager() {
		return balanceDBManager;
	}

	public void setBalanceDBManager(BalanceDBManager balanceDBManager) {
		this.balanceDBManager = balanceDBManager;
	}

}
